<?php

namespace app\controllers;

use Yii;
use yii\web\Controller;
use app\components\BaseController;
use yii\web\Response;

class ErrorsController extends BaseController
{
    /**
     * @inheritdoc
     */
    public function actions()
    {
        return [
            'error' => [
                'class' => 'yii\web\ErrorAction',
            ],
        ];
    }

    /**
     * Displays homepage.
     */
    public function actionIndex()
    {
        $message = Yii::$app->request->get('message');
        $code = Yii::$app->request->get('code');
        return $this->render('index', [
            'message' => $message,
            'code' => $code
        ]);
    }

}
